package com.aivin.waterfallflow.tool;
import com.aivin.waterfallflow.bean.HeartBeatTask;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

public class WkHeartBeatTool {
    private ScheduledExecutorService mScheduledExecutorService;

    public WkHeartBeatTool() {
        mScheduledExecutorService = Executors.newScheduledThreadPool(5);
    }


    public void startDelayedAction( HeartBeatTask task , int delayTime){
        mScheduledExecutorService.schedule( task, delayTime , TimeUnit.MILLISECONDS );
    }

}
